package com.cxx.purchasecharge.dal;

import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import com.cxx.purchasecharge.core.model.persistence.GoodsStorage;
import com.cxx.purchasecharge.dal.common.GenericCRUDDao;

@Transactional
public interface GoodsStorageDao extends GenericCRUDDao <GoodsStorage, Long>
{

    public GoodsStorage findById (long id);

    @Query (value = "select s from GoodsStorage s where s.goods.id=?1")
    public GoodsStorage findByGoods (long goodsId);

}
